<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>当月计划</title>
		<link href="../css/mngMain.css" type="text/css" rel="stylesheet" />
		<style type="text/css" media="screen">
.pageText {
	color: #000;
}
</style>
		<script type="text/javascript" src="../js/jquery.js"></script>
		<script type="text/javascript">
       $(function(){
          $("#selectAllBox").click(function(){
      			 $("input[@type=checkbox]",$("#user_table")).each(function(){ 
                      $(this).attr({checked:true});                     
                 });
                 return false;
		  }); //end of allCheck
                   
          $("#deSelectAllBox").click(function(){
      			 $("input[@type=checkbox]",$("#user_table")).each(function(){ 
                      $(this).attr({checked:false});                     
                 });
                 return false;
		  }); 
		  
		  $("#delSelected").click(function(){
		         var someSelectd = false;
      			 $("input[@type=checkbox]",$("#user_table")).each(function(){ 
                      if(this.checked)
                      {
                          someSelectd=true;
                      }             
                 });
                 if(someSelectd)
                 {
                 	if (confirm('你确认要删吗？')) document.getElementById('userListForm').submit();
                 }
                 else
                 {
                 	alert('您未选定任何行!');
                 }
                 return false;
		  }); 
		  
          $("#usertype_jq").change( function(){	  
               if("2" == $("#usertype_jq").attr("value")){
	     	         window.location.href="adminUser.do?type=outer";	     	         
	     	   }
	     	   else if("1" == $("#usertype_jq").attr("value")){
	     	   	     window.location.href="adminUser.do?type=inner";  
	     	   }else{
	     	         window.location.href="adminUser.do";
	     	   }	                    
          });
          
          $("#search_btn").click(function(){
              if($("#search_input").attr("value")=="-1"){
                  alert("请选择搜索条件");
              }else{
                 $("#searchForm").submit();
              }
              return false;
          });
       });   
       function changeUserType(m){
       	var id = $(m).attr("id");
       	var type="up";
       	$.post("upUserType.do",{userId:id,type:type},function(da){
       		if(da=="succ"){
       			window.location.reload();
       		}else{
       			alert("升级vip失败！");
       		}
       	});
       }  
       function downUserType(m){
       	var id = $(m).attr("id");
       	var type="down";
       	$.post("upUserType.do",{userId:id,type:type},function(da){
       		if(da=="succ"){
       			window.location.reload();
       		}else{
       			alert("取消vip失败！");
       		}
       	});
       }
</script>
	</head>

	<body>
		<div class="controlBox">
			<%@include file="../admin_top.jsp"%>
			<div class="mngMain">
				<div class="mngLeft">
					<%@include file="../admin_menu.jsp"%>
				</div>
				<div class="mngRight">
					<div class="mngRightContainer">
						<div class="mngRightContainerT">
							当月计划
						</div>
						<div class="mngRightContainerM">
							

							<div>
								<form id="userListForm" action="delProjet.do">
									<table id="user_table" class="editUser" cellpadding="0"
										cellspacing="1">
										<tr>
											<th width="5%"></th>
											<th width="10%">
												标题
											</th>
											<th width="50%">
												内容
											</th>
											<th width="5%">
												操作
											</th>
										</tr>
										<logic:notEmpty name="projetList">
											<logic:iterate id="projet" name="projetList" indexId="i">
												<tr>
													<td>
														<input type="checkbox" name="delId"
															value="<bean:write name='projet' property='id' />" />
													</td>
													<td>
														<bean:write name="projet" property="title" />
													</td>
													<td>
														<bean:write name="projet" filter="false"  property="content" />
													</td>
													<td>
														<a href="preEditProjet.do?projetId=<bean:write name="projet" property="id" />">编辑</a>
													</td>
												</tr>
											</logic:iterate>
										</logic:notEmpty>
									</table>

									<table class="changePage" cellspacing="1">
										<tr>
											<!--  <td><a href="null#" id="selectAllBox">全选</a><a href="null#" id="deSelectAllBox">反选</a><a href="#" id="delSelected">删除选中</a></td>-->
											<td>
												<a href="null#" id="selectAllBox">全选</a><a href="null#" id="deSelectAllBox">反选</a><a href="#" id="delSelected">删除选中</a>
												</td>
												<td>
												<a href="preAddProjet.do" >添加当月计划</a>
											</td>
											
										</tr>
									</table>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="mngBottom">
				<div class="mngLine"></div>
			</div>
		</div>
	</body>
</html>
